<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
        name="viewport">
    <meta content="ie=edge" http-equiv="X-UA-Compatible">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <h1>{{ hello }}</h1>
        <button v-on:click="showInfo">点我提示信息(不传参)</button>
        <button @click="showInfo2($event,66)">点我提示信息(传参)</button>
    </div>


    <script src="../JS/vue.js"></script>
    <script>
        new Vue({
            el: '#app',
            data() {
                return {
                    hello: 'Hello,Word!!',
                    name: 'Tom'
                }
            },
            methods: {
                showInfo() {
                    alert('欢迎1')
                },
                showInfo2(event,number) {
                    console.log(event,number);
                    alert('欢迎2')
                }
            }
        })
    </script>
</body>

</html>